<script type='text/javascript'>
        function fastSub_jingdian() {
                $('#form_jingdian').attr('action', '{:U("Product/jingdian_add_fast")}');
                $('#form_jingdian').submit();
        }
        function reback_jingdian() {
                $('#form_jingdian').attr('action', '{:U("Product/jingdian_add")}');
        }
        function jingdian_upload_success(file, data) {
                var json = $.parseJSON(data)
                $(this).bjuiajax('ajaxDone', json)
                if (json[BJUI.keys.statusCode] == BJUI.statusCode.ok) {
                        $('#j_jingdian_pic').val(json.filename).trigger('validate')
                        $('#j_jingdian_span_pic').html('<img src="' + json.filename + '" width="100" />')
                }
        }
</script>
<div class="bjui-pageContent" >
        <div data-layout-h="0">
                <!-- 内容区 -->
                <form action="{:U('Product/jingdian_add')}" class="pageForm nice-validator n-red" id="form_jingdian"   data-loadingmask='false' data-toggle="validate" novalidate="novalidate" method="post" >
                        <input type="hidden" name="id" value="{$_GET.id|default=''}" />
                        <!-- navtab类型判断 -->
                        <input type="hidden" name="navTabname" value="Product/jingdian" />
                        <table  style="margin-top: 20px;">
                                <tr >
                                        <td><label style='margin-left:40px;'>目的地选择：</label></td>
                                        <td>
                                                <input type="hidden" name="jingdian.id"  value="{$jingdian.jingdian_id|default=''}" />
                                                <input type="text" data-title='选择目的地' name="jingdian.name" data-rule='required' value="{$jingdian.location_name|default=''}" size="15" data-toggle="lookup" data-url="{:U('Pub/get_location_single')}" data-group="jingdian" data-width="300" data-height="400">
                                        </td>

                                </tr>
                                <tr >
                                        <td><label style='margin-left:40px;'>重定向字符：</label></td>
                                        <td>
                                                <input type="text" name="write_string" data-rule='required' value="{$jingdian.write_string|default=''}"/>
                                        </td>

                                </tr>
                                <tr>
                                        <td width='150' ><label style='margin-left:40px;'>内容：</label></td>
                                        <td>
                                                <div style='width:auto; margin-top: 20px;'>
                                                        <ul class="nav nav-tabs" role="tablist" >
                                                                <li class="active"><a href="#jianjie" role="tab" data-toggle="tab">简介</a></li>
                                                                <li><a href="#menpiao" role="tab" data-toggle="tab">门票</a></li>
                                                                <li><a href="#jiaotong" role="tab" data-toggle="tab">交通</a></li>
                                                                <li><a href="#meishi" role="tab" data-toggle="tab">美食</a></li>
                                                                <li><a href="#gouwu" role="tab" data-toggle="tab">购物</a></li>
                                                                <li><a href="#zhusu" role="tab" data-toggle="tab">住宿</a></li>
                                                                <li><a href="#tianqi" role="tab" data-toggle="tab">天气</a></li>

                                                        </ul>
                                                        <div class="tab-content" >
                                                                <div class="tab-pane fade active in " id="jianjie" style="margin-top:0px;">
                                                                        <div style="display: inline-block; vertical-align: middle;">
                                                                                <textarea cols="100" data-min-height='400' data-toggle="kindeditor" name="content_jianjie">{$jingdian.content_jianjie|default=''}</textarea>
                                                                        </div>
                                                                </div>
                                                                <div class="tab-pane fade" id="menpiao" style="margin-top:0px;">
                                                                        <div style="display: inline-block; vertical-align: middle;">
                                                                                <textarea cols="100" data-min-height='400' data-toggle="kindeditor" name="content_menpiao">{$jingdian.content_menpiao|default=''}</textarea>
                                                                        </div>
                                                                </div>
                                                                <div class="tab-pane fade" id="jiaotong" style="margin-top:0px;">
                                                                        <div style="display: inline-block; vertical-align: middle;">
                                                                                <textarea cols="100" data-min-height='400' data-toggle="kindeditor" name="content_jiaotong">{$jingdian.content_jiaotong|default=''}</textarea>
                                                                        </div>
                                                                </div>
                                                                <!--老人-->
                                                                <div class="tab-pane fade" id="meishi" style="margin-top:0px;">
                                                                        <div style="display: inline-block; vertical-align: middle;">
                                                                                <textarea cols="100" data-min-height='400' data-toggle="kindeditor" name="content_meishi">{$jingdian.content_meishi|default=''}</textarea>
                                                                        </div>
                                                                </div>
                                                                <!--残疾人-->
                                                                <div class="tab-pane fade" id="gouwu" style="margin-top:0px;">
                                                                        <div style="display: inline-block;  vertical-align: middle;">
                                                                                <textarea cols="100" data-min-height='400' data-toggle="kindeditor" name="content_gouwu">{$jingdian.content_gouwu|default=''}</textarea>
                                                                        </div>
                                                                </div>
                                                                <!--军官-->
                                                                <div class="tab-pane fade" id="zhusu" style="margin-top:0px;">
                                                                        <div style="display: inline-block; vertical-align: middle;">
                                                                                <textarea cols="100" data-min-height='400' data-toggle="kindeditor" name="content_zhusu" >{$jingdian.content_zhusu|default=''}</textarea>
                                                                        </div>
                                                                </div>
                                                                <div class="tab-pane fade" id="tianqi" style="margin-top:0px;">
                                                                        <div style="display: inline-block; vertical-align: middle;">
                                                                                <textarea cols="100" data-min-height='400' data-toggle="kindeditor" name="content_tianqi" >{$jingdian.content_tianqi|default=''}</textarea>
                                                                        </div>
                                                                </div>
                                                        </div>
                                                </div>
                                        </td>
                                </tr>

                                <tr>
                                        <td width='150'><label style='margin-left:40px;'>焦点图：</label></td>
                                        <td>
                                                <div style="display:inline-block; vertical-align:middle;">
                                                        <div id="jingdian_pic_up" data-toggle="upload" data-uploader="{:U('Pub/image_upload?path=jingdian')}" 
                                                             data-file-size-limit="1024000000"
                                                             data-file-type-exts="*.jpg;*.png;*.gif;*.mpg"
                                                             data-multi="false"
                                                             data-on-upload-success="jingdian_upload_success"
                                                             data-icon="cloud-upload"
                                                             data-preview-img ='false'
                                                             data-auto='true'></div>
                                                        <input type="text" name="image" value="{$jingdian.image|default=''}" id="j_jingdian_pic">
                                                        <br/>
                                                        <span id="j_jingdian_span_pic">
                                                                {notempty name='jingdian.image'}
                                                                <img src="{$jingdian.image|default=''}"  width='100'/>
                                                                {/notempty}
                                                        </span>
                                                        
                                                </div><div  class="alert alert-warning form-inline"><i class="fa fa-warning"></i>单图上传切勿多图</div>
                                        </td>
                                </tr>
                                <tr>
                                        <td>&nbsp;</td>
                                        <td><a style="position: fixed; right: 20px; bottom: 90px;" onclick="fastSub_jingdian()"  data-toggle="doajax"  class="btn btn-red">快速保存</a>

                                                <div style="position: fixed; right: 20px; bottom: 60px;" class="alert alert-warning form-inline"><i class="fa fa-warning"></i>为防止登录超时请常用快速保存按钮</div></td>
                                </tr>



                        </table>
                </form>
        </div>

</div>
<div class="bjui-pageFooter" border='none'>
        <ul>
                <li><button type="button" class="btn btn-close">关闭</button></li>
                <li><button type="submit" onclick="reback_jingdian()" class="btn btn-default">提交</button></li>
        </ul>
</div>
